<?php
// include function files for this application
require_once('/home/domains/uny-con.com/public_html/uny-con_fns.php');
if (!session_id()) { session_start(); }

//get some variables:
if (isset($_SESSION['current_attendee_id'])) $_SESSION['current_attendee_id'] = $_SESSION['attendee_id'];

//if (isset($_GET['attendee_id'])) $requested_attn_id = $_GET['attendee_id'];
//if (isset($_GET['action'])) $action = $_GET['action'];

//This is an admin only script so first lets check to make sure the user is valid and an admin. then we can do toher stuff.

if (!check_valid_user() || ($_SESSION['admin'] != 't')) {
	do_html_header('Unauthorized access', staysmall, $uny);
	echo 'You are not logged in or are not authorized to view this page. Please move along.';
	print_brs(24);
	do_html_footer(news);
	exit;
	}


do_html_header('Admin Home', staysmall, $uny);

echo "<h1>Welcome to the administrative home page</h1>\n";

echo "<h2>Searching</h2>\n";
echo "<p><strong>Search for attendees:</strong></p>\n";
print_attendee_search_form();
echo "<p><strong>Search for events:</strong></p>\n";
print_event_search_form();

echo "<h2>Reports</h2>\n";
echo "<ul class=\"plainul\">\n";
echo "<li class=\"infolist\"><a href=\"manage_attendees.php\">Show all</a> the people who theoretically owe money.</li>\n";
echo "<li class=\"infolist\"><a href=\"gmeventreport.php?num=26\">Show </a> GMs running 24 or more hours.</li>\n";
echo "<li class=\"infolist\"><a href=\"gmeventreport.php?num=20\">Show </a> GMs running 20 or more hours.</li>\n";
echo "<li class=\"infolist\"><a href=\"gmeventreport.php?num=16\">Show </a> GMs running 16 or more hours.</li>\n";
echo "<li class=\"infolist\"><a href=\"gmeventreport.php?num=12\">Show </a> GMs running 12 or more hours.</li>\n";
echo "<li class=\"infolist\"><a href=\"gmeventreport.php?num=8\">Show </a> GMs running 8 or more hours.</li>\n";
echo "</ul>\n";

echo "<h2>Statistics</h2>\n";
echo "<ul class=\"plainul\">\n";
echo "<li class=\"infolist\"><a href=\"trans_log.php\">View Transaction log.</a></li>\n";
echo "<li class=\"infolist\"><a href=\"badge_report.php\">View Convention Registration by Badge Type.</a></li>\n";
echo "<li class=\"infolist\"><a href=\"event_reg_revenue.php\">View Event Revenue.</a></li>\n";
echo "<li class=\"infolist\"><a href=\"event_reg_ts.php\">View Event Registration by Timeslot.</a></li>\n";
echo "<li class=\"infolist\"><a href=\"event_reg_type.php\">View Event Registration by Event Type.</a></li>\n";
echo "<li class=\"infolist\"><a href=\"event_reg_both.php\">View Event Registration by Timeslot and Game Type.</a></li>\n";
echo "<li class=\"infolist\">View Stats page.</li>\n";
echo "</ul>\n";

echo "<h2>Room Management</h2>\n";
echo "<ul class=\"plainul\">\n";
echo "<li class=\"infolist\"><a href=\"manage_rooms.php\">Add rooms</a>.</li>\n";
echo "<li class=\"infolist\"><a href=\"assign_rooms.php\">Assign rooms</a>.</li>\n";
echo "<li class=\"infolist\"><a href=\"room_report.php\">See currently assigned rooms</a>.</li>\n";
echo "</ul>\n";

echo "<h2>Convention Management</h2>\n";
echo "<ul class=\"plainul\">\n";
echo "<li class=\"infolist\"><a href=\"manage_con_badges.php\">Manage Badge Types</a>.</li>\n";
echo "<li class=\"infolist\"><a href=\"con_discount.php\">Generate Discount</a>.</li>\n";
echo "<li class=\"infolist\"><a href=\"assign_rooms.php\">View Discounts</a>.</li>\n";
echo "</ul>\n";

echo "<h2>Files</h2>\n";
echo "<ul class=\"plainul\">\n";
echo "<li class=\"infolist\"><a href=\"celf.php\">Event list block file</a>.</li>\n";
echo "<li class=\"infolist\"><a href=\"celcsv.php\">Event list csv file and quick guide</a>.</li>\n";
echo "<li class=\"infolist\"><a href=\"csvbyts.php\">CSV Files by TS</a>.</li>\n";
echo "<li class=\"infolist\"><a href=\"badge_file.php\">Event badge csv</a>.</li>\n";
echo "</ul>\n";

do_html_footer(news);

?>